<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>综合页面</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background-color: #f5f5f5;
            height: 2000px;
        }
        
        /* 顶部广告样式 */
        .top-ad {
            background-color: #ff6b6b;
            color: white;
            text-align: center;
            padding: 10px 0;
            font-size: 16px;
            position: relative;
        }
        
        .close-ad {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            cursor: pointer;
            font-size: 20px;
        }
        
        /* 导航条样式 */
        .navbar {
            background-color: #333;
            color: white;
            padding: 15px 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .nav-container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            font-size: 24px;
            font-weight: bold;
        }
        
        .nav-links {
            display: flex;
            list-style: none;
        }
        
        .nav-links li {
            margin-left: 20px;
        }
        
        .nav-links a {
            color: white;
            text-decoration: none;
            transition: color 0.3s;
        }
        
        .nav-links a:hover {
            color: #ff6b6b;
        }
        
        /* 轮播图样式 */
        .slider-container {
            width: 100%;
            max-width: 1200px;
            margin: 20px auto;
            position: relative;
            overflow: hidden;
            height: 400px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        
        .slider {
            display: flex;
            transition: transform 0.5s ease;
            height: 100%;
        }
        
        .slide {
            min-width: 100%;
            height: 100%;
            position: relative;
        }
        
        .slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .slide-content {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0, 0, 0, 0.5);
            color: white;
            padding: 20px;
        }
        
        .slide-content h2 {
            margin-bottom: 10px;
        }
        
        .slider-controls {
            position: absolute;
            top: 50%;
            width: 100%;
            display: flex;
            justify-content: space-between;
            transform: translateY(-50%);
        }
        
        .slider-btn {
            background: rgba(255, 255, 255, 0.5);
            border: none;
            color: #333;
            font-size: 24px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            margin: 0 15px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .slider-indicators {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
        }
        
        .indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            margin: 0 5px;
            cursor: pointer;
        }
        
        .indicator.active {
            background: white;
        }
        
        /* 内容区域样式 */
        .content {
            width: 90%;
            max-width: 1200px;
            margin: 30px auto;
        }
        
        .section-title {
            font-size: 24px;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #ff6b6b;
        }
        
        .news-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
        }
        
        .news-card {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s;
        }
        
        .news-card:hover {
            transform: translateY(-5px);
        }
        
        .news-card img {
            width: 100%;
            height: 180px;
            object-fit: cover;
        }
        
        .news-content {
            padding: 15px;
        }
        
        .news-content h3 {
            margin-bottom: 10px;
            font-size: 18px;
        }
        
        .news-content p {
            color: #666;
            font-size: 14px;
            margin-bottom: 15px;
        }
        
        .news-content .date {
            color: #999;
            font-size: 12px;
        }
        
        /* 回到顶部按钮 */
        .back-to-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 50px;
            height: 50px;
            background-color: #ff6b6b;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
            z-index: 99;
        }
        
        .back-to-top.show {
            opacity: 1;
            visibility: visible;
        }
        
        .back-to-top:hover {
            background-color: #ff5252;
        }
        
        /* 页脚样式 */
        footer {
            background-color: #333;
            color: white;
            text-align: center;
            padding: 20px 0;
            margin-top: 50px;
        }
    </style>
</head>
<body>
    <!-- 顶部广告 -->
    <div class="top-ad">
        限时优惠！全场商品5折起 <span class="close-ad">×</span>
    </div>
    
    <!-- 导航条 -->
    <nav class="navbar">
        <div class="nav-container">
            <div class="logo">网站LOGO</div>
            <ul class="nav-links">
                <li><a href="#">首页</a></li>
                <li><a href="#">新闻</a></li>
                <li><a href="#">产品</a></li>
                <li><a href="#">关于我们</a></li>
                <li><a href="#">联系方式</a></li>
            </ul>
        </div>
    </nav>
    
    <!-- 轮播图 -->
    <div class="slider-container">
        <div class="slider">
            <div class="slide">
                <img src="https://via.placeholder.com/1200x400/ff6b6b/ffffff?text=Slide+1" alt="Slide 1">
                <div class="slide-content">
                    <h2>标题一</h2>
                    <p>这里是轮播图第一张的描述内容</p>
                </div>
            </div>
            <div class="slide">
                <img src="https://via.placeholder.com/1200x400/6b6bff/ffffff?text=Slide+2" alt="Slide 2">
                <div class="slide-content">
                    <h2>标题二</h2>
                    <p>这里是轮播图第二张的描述内容</p>
                </div>
            </div>
            <div class="slide">
                <img src="https://via.placeholder.com/1200x400/6bff6b/ffffff?text=Slide+3" alt="Slide 3">
                <div class="slide-content">
                    <h2>标题三</h2>
                    <p>这里是轮播图第三张的描述内容</p>
                </div>
            </div>
        </div>
        
        <div class="slider-controls">
            <button class="slider-btn prev-btn">❮</button>
            <button class="slider-btn next-btn">❯</button>
        </div>
        
        <div class="slider-indicators">
            <div class="indicator active"></div>
            <div class="indicator"></div>
            <div class="indicator"></div>
        </div>
    </div>
    
    <!-- 内容区域 -->
    <div class="content">
        <h2 class="section-title">最新热点</h2>
        <div class="news-grid">
            <div class="news-card">
                <img src="https://via.placeholder.com/400x300/cccccc/ffffff?text=News+1" alt="News 1">
                <div class="news-content">
                    <h3>热点新闻标题一</h3>
                    <p>这里是热点新闻一的简要描述内容，展示在卡片上...</p>
                    <div class="date">2023-05-15</div>
                </div>
            </div>
            <div class="news-card">
                <img src="https://via.placeholder.com/400x300/cccccc/ffffff?text=News+2" alt="News 2">
                <div class="news-content">
                    <h3>热点新闻标题二</h3>
                    <p>这里是热点新闻二的简要描述内容，展示在卡片上...</p>
                    <div class="date">2023-05-14</div>
                </div>
            </div>
            <div class="news-card">
                <img src="https://via.placeholder.com/400x300/cccccc/ffffff?text=News+3" alt="News 3">
                <div class="news-content">
                    <h3>热点新闻标题三</h3>
                    <p>这里是热点新闻三的简要描述内容，展示在卡片上...</p>
                    <div class="date">2023-05-13</div>
                </div>
            </div>
            <div class="news-card">
                <img src="https://via.placeholder.com/400x300/cccccc/ffffff?text=News+4" alt="News 4">
                <div class="news-content">
                    <h3>热点新闻标题四</h3>
                    <p>这里是热点新闻四的简要描述内容，展示在卡片上...</p>
                    <div class="date">2023-05-12</div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 回到顶部按钮 -->
    <div class="back-to-top">↑</div>
    
    <!-- 页脚 -->
   <script>
        // 关闭顶部广告
        document.querySelector('.close-ad').addEventListener('click', function() {
            document.querySelector('.top-ad').style.display = 'none';
        });
        
        // 轮播图功能
        const slider = document.querySelector('.slider');
        const slides = document.querySelectorAll('.slide');
        const prevBtn = document.querySelector('.prev-btn');
        const nextBtn = document.querySelector('.next-btn');
        const indicators = document.querySelectorAll('.indicator');
        
        let currentIndex = 0;
        const slideCount = slides.length;
        
        function updateSlider() {
            slider.style.transform = `translateX(-${currentIndex * 100}%)`;
            
            // 更新指示器状态
            indicators.forEach((indicator, index) => {
                if (index === currentIndex) {
                    indicator.classList.add('active');
                } else {
                    indicator.classList.remove('active');
                }
            });
        }
        
        function nextSlide() {
            currentIndex = (currentIndex + 1) % slideCount;
            updateSlider();
        }
        
        function prevSlide() {
            currentIndex = (currentIndex - 1 + slideCount) % slideCount;
            updateSlider();
        }
        
        nextBtn.addEventListener('click', nextSlide);
        prevBtn.addEventListener('click', prevSlide);
        
        // 添加指示器点击事件
        indicators.forEach((indicator, index) => {
            indicator.addEventListener('click', () => {
                currentIndex = index;
                updateSlider();
            });
        });
        
        // 自动轮播
        let slideInterval = setInterval(nextSlide, 5000);
        
        // 鼠标悬停时暂停轮播
        const sliderContainer = document.querySelector('.slider-container');
        sliderContainer.addEventListener('mouseenter', () => {
            clearInterval(slideInterval);
        });
        
        sliderContainer.addEventListener('mouseleave', () => {
            slideInterval = setInterval(nextSlide, 5000);
        });
        
        // 回到顶部功能
        const backToTopBtn = document.querySelector('.back-to-top');
        
        window.addEventListener('scroll', () => {
            if (window.pageYOffset > 300) {
                backToTopBtn.classList.add('show');
            } else {
                backToTopBtn.classList.remove('show');
            }
        });
        
        backToTopBtn.addEventListener('click', () => {
            window.scrollTo({
                top: 0,
                behavior: 'smooth'
            });
        });
    </script>
</body>
</html>